import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/:id?',component: () => import("../views/Home/index.vue")
  },
  {
    path: '/video/:id?',
    component: () => import("../views/Video/index.vue"),
    children:[
      {
        path:'recommend',
        component:()=>import("@/views/Video/recommend/index.vue"),
      },
      {
        path:'comment',
        component:()=>import("@/views/Video/comment/index.vue"),
      }
    ]
  }

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
